package com.kcht.np.vo.user;

import lombok.Data;
import lombok.ToString;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * 用户自身可修改信息
 * */
@ToString
@Data
public class UserCanModifyInfo {
    @Size(min = 5, message = "密码长度不能少于五位")
    private String password;
    /**
     * 邮箱
     *
     */
    @Pattern(regexp = "^[a-zA-Z0-9_\\-@.]*$",message = "邮箱命名不正确")
    private String email;
    /**
     * 昵称
     *
     */
    @Size(min = 1, message = "昵称长度不能少于1位")
    private String nickname;

    /**
     * 性别
     *
     */
    @Max(value = 2,message = "只能为女[0],男[1],未知[2]")
    @Min(value=0,message = "只能为女[0],男[1],未知[2]")
    private Integer gender;
}
